package com.thinkfit.jy.utils;

import com.common.lib.manager.DataManager;
import com.thinkfit.jy.R;

/**
 * 主题工具类（新主题从4后开始加）
 */
public class ThemeUtils {
    private static ThemeUtils themeUtils;


    public static final int THEME_MAIN = 0;
    public static final int THEME_SCENERY = 1;
    public static final int THEME_EARTH = 2;
    public static final int THEME_STARRY_SKY = 3;
    public static final int THEME_DRAGON_BOAT_FESTIVAL = 4;
    public static final int THEME_FIRE_PROTECTION = 5;
    public static final int THEME_PINK = 6;
    public static final int THEME_LANDSCAPE = 7;


    public static ThemeUtils getInstance(){
        if(themeUtils == null){
            themeUtils = new ThemeUtils();
        }
        return themeUtils;
    }

    /**
     * 获取背景图片
     * @return
     */
    public int getMainTheme(){
        int mainTheme = DataManager.Companion.getInstance().getMainTheme();
        int mainRes;
        System.out.println("aaaaaaaaaaaaaaaaaaaaaa  theme : "+mainTheme);
        switch (mainTheme){
            case ThemeUtils.THEME_MAIN:
                mainRes = R.drawable.img_main_bg;
                break;
            case ThemeUtils.THEME_SCENERY:
                mainRes = R.drawable.img_theme_scenery;
                break;
            case ThemeUtils.THEME_EARTH:
                mainRes = R.drawable.img_theme_earth;
                break;
            case ThemeUtils.THEME_STARRY_SKY:
                mainRes = R.drawable.img_theme_starry_sky;
                break;
            case ThemeUtils.THEME_DRAGON_BOAT_FESTIVAL:
                mainRes = R.drawable.img_theme_dragon_boat_festival;
                break;
            case ThemeUtils.THEME_FIRE_PROTECTION:
                mainRes = R.drawable.img_theme_fire_protection;
                break;
            case ThemeUtils.THEME_PINK:
                mainRes = R.drawable.img_theme_pink;
                break;
            case ThemeUtils.THEME_LANDSCAPE:
                mainRes = R.drawable.img_theme_landscape;
                break;
            default:
                mainRes = R.drawable.img_main_bg;
                break;
        }
        return mainRes;
    }

}
